package partitions;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import java.awt.Font;
import javax.swing.JLabel;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.Color;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class InfoPanel extends JPanel {
	private static final long serialVersionUID = 1L;
	
	public JLabel channels;
	public JLabel slices;
	public JLabel pixels;
	public JLabel dimensions;
	public JLabel type;
	public JLabel title;
	public JLabel regions;
	public JLabel globalRange;
	public JLabel localRange;
	public JLabel cindex;
	public JLabel elapsed;
	public JLabel elapsed2;
	public JLabel pixel;
	public JLabel inputValue;
	public JLabel outputValue;
	public JLabel regionId;
	public JLabel regionSize;
	public JLabel outputValue2;
	public JLabel method;
	public JLabel random;
	public JLabel iterations;
	
	private Listener listener;
	
	public InfoPanel(Listener listener) {
		this.listener = listener;
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setFont(new Font("Calibri", Font.PLAIN, 16));
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addComponent(tabbedPane, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE)
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup()
					.addContainerGap()
					.addComponent(tabbedPane, GroupLayout.PREFERRED_SIZE, 264, Short.MAX_VALUE))
		);
		
		JPanel panel = new JPanel();
		panel.setBackground(new Color(248, 248, 255));
		
		JPanel panel_5 = new JPanel();
		panel_5.setBackground(new Color(244, 244, 244));
		
		channels = new JLabel("");
		channels.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		slices = new JLabel("");
		slices.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		pixels = new JLabel("");
		pixels.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		dimensions = new JLabel("");
		dimensions.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		type = new JLabel("");
		type.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		title = new JLabel("");
		title.setFont(new Font("Calibri", Font.PLAIN, 16));
		GroupLayout gl_panel = new GroupLayout(panel);
		gl_panel.setHorizontalGroup(
			gl_panel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel.createSequentialGroup()
					.addComponent(panel_5, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)
						.addComponent(title, GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
						.addComponent(pixels, GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
						.addComponent(slices, GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
						.addComponent(channels, GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE)
						.addComponent(dimensions, GroupLayout.DEFAULT_SIZE, 292, Short.MAX_VALUE)
						.addComponent(type, GroupLayout.DEFAULT_SIZE, 302, Short.MAX_VALUE))
					.addContainerGap())
		);
		gl_panel.setVerticalGroup(
			gl_panel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel.createSequentialGroup()
					.addContainerGap()
					.addComponent(title, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(type, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(dimensions, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(pixels, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(slices, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(channels, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(23, Short.MAX_VALUE))
				.addComponent(panel_5, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE)
		);
		
		JLabel label = new JLabel("Title:");
		label.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel label_1 = new JLabel("Type:");
		label_1.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel label_2 = new JLabel("Dimensions:");
		label_2.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel label_6 = new JLabel("Pixels:");
		label_6.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel label_7 = new JLabel("Slices:");
		label_7.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel label_8 = new JLabel("Channels:");
		label_8.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JSeparator separator = new JSeparator();
		separator.setOrientation(SwingConstants.VERTICAL);
		GroupLayout gl_panel_5 = new GroupLayout(panel_5);
		gl_panel_5.setHorizontalGroup(
			gl_panel_5.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_5.createSequentialGroup()
					.addContainerGap()
					.addGroup(gl_panel_5.createParallelGroup(Alignment.LEADING)
						.addComponent(label, GroupLayout.PREFERRED_SIZE, 33, GroupLayout.PREFERRED_SIZE)
						.addComponent(label_1, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
						.addComponent(label_2, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
						.addComponent(label_6, GroupLayout.PREFERRED_SIZE, 42, GroupLayout.PREFERRED_SIZE)
						.addComponent(label_7, GroupLayout.PREFERRED_SIZE, 41, GroupLayout.PREFERRED_SIZE)
						.addComponent(label_8, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
					.addComponent(separator, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addGap(1))
		);
		gl_panel_5.setVerticalGroup(
			gl_panel_5.createParallelGroup(Alignment.TRAILING)
				.addGroup(Alignment.LEADING, gl_panel_5.createSequentialGroup()
					.addContainerGap()
					.addComponent(label, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(label_1, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(label_2, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(label_6, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(label_7, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(label_8, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(23, Short.MAX_VALUE))
				.addComponent(separator, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE)
		);
		panel_5.setLayout(gl_panel_5);
		panel.setLayout(gl_panel);
		
		JPanel panel_4 = new JPanel();
		panel_4.setBackground(new Color(248, 248, 255));
		tabbedPane.addTab("  Partition  ", null, panel_4, null);
		tabbedPane.addTab("  Image  ", null, panel, null);

		
		JPanel panel_6 = new JPanel();
		panel_6.setBackground(new Color(244, 244, 244));
		
		JLabel lblRegions = new JLabel("Regions:");
		lblRegions.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel lblGlobalRange_1 = new JLabel("Global range:");
		lblGlobalRange_1.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel lblLocalRange = new JLabel("Local range:");
		lblLocalRange.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel lblConnectivityIndex = new JLabel("Connectivity index:");
		lblConnectivityIndex.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JSeparator separator_1 = new JSeparator();
		separator_1.setOrientation(SwingConstants.VERTICAL);
		
		JLabel lblTimeElapsed = new JLabel("Elapsed time:");
		lblTimeElapsed.setFont(new Font("Calibri", Font.PLAIN, 16));
		GroupLayout gl_panel_6 = new GroupLayout(panel_6);
		gl_panel_6.setHorizontalGroup(
			gl_panel_6.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_6.createSequentialGroup()
					.addContainerGap()
					.addGroup(gl_panel_6.createParallelGroup(Alignment.LEADING)
						.addComponent(lblRegions, GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)
						.addComponent(lblGlobalRange_1, GroupLayout.PREFERRED_SIZE, 177, Short.MAX_VALUE)
						.addComponent(lblLocalRange, GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)
						.addComponent(lblConnectivityIndex, GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)
						.addComponent(lblTimeElapsed, GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(separator_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addGap(4))
		);
		gl_panel_6.setVerticalGroup(
			gl_panel_6.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_6.createSequentialGroup()
					.addContainerGap()
					.addComponent(lblRegions, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblGlobalRange_1, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblLocalRange, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblConnectivityIndex, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblTimeElapsed, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(49, Short.MAX_VALUE))
				.addComponent(separator_1, GroupLayout.DEFAULT_SIZE, 232, Short.MAX_VALUE)
		);
		panel_6.setLayout(gl_panel_6);
		
		regions = new JLabel("");
		regions.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		globalRange = new JLabel("");
		globalRange.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		localRange = new JLabel("");
		localRange.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		cindex = new JLabel("");
		cindex.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		elapsed = new JLabel("");
		elapsed.setFont(new Font("Calibri", Font.PLAIN, 16));
		GroupLayout gl_panel_4 = new GroupLayout(panel_4);
		gl_panel_4.setHorizontalGroup(
			gl_panel_4.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_4.createSequentialGroup()
					.addComponent(panel_6, GroupLayout.PREFERRED_SIZE, 194, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addGroup(gl_panel_4.createParallelGroup(Alignment.TRAILING)
						.addComponent(elapsed, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
						.addComponent(localRange, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
						.addComponent(globalRange, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
						.addComponent(regions, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
						.addComponent(cindex, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE))
					.addContainerGap())
		);
		gl_panel_4.setVerticalGroup(
			gl_panel_4.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_4.createSequentialGroup()
					.addContainerGap()
					.addComponent(regions)
					.addGap(18)
					.addComponent(globalRange, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(localRange, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(cindex, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(elapsed, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(67, Short.MAX_VALUE))
				.addComponent(panel_6, GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
		);
		panel_4.setLayout(gl_panel_4);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBackground(new Color(248, 248, 255));
		tabbedPane.addTab("  Pixel  ", null, panel_1, null);
		
		JPanel panel_7 = new JPanel();
		panel_7.setBackground(new Color(244, 244, 244));
		
		JLabel lblPixelxY = new JLabel("Coordinates (x, y):");
		lblPixelxY.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel lblValueIn = new JLabel("Input value:");
		lblValueIn.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel lblValueInThe_2 = new JLabel("Output value:");
		lblValueInThe_2.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JSeparator separator_2 = new JSeparator();
		separator_2.setOrientation(SwingConstants.VERTICAL);
		GroupLayout gl_panel_7 = new GroupLayout(panel_7);
		gl_panel_7.setHorizontalGroup(
			gl_panel_7.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_7.createSequentialGroup()
					.addContainerGap()
					.addGroup(gl_panel_7.createParallelGroup(Alignment.LEADING)
						.addComponent(lblPixelxY, GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)
						.addComponent(lblValueIn, GroupLayout.PREFERRED_SIZE, 208, Short.MAX_VALUE)
						.addComponent(lblValueInThe_2, GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(separator_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addGap(1))
		);
		gl_panel_7.setVerticalGroup(
			gl_panel_7.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_7.createSequentialGroup()
					.addContainerGap()
					.addComponent(lblPixelxY, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblValueIn, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblValueInThe_2, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(123, Short.MAX_VALUE))
				.addComponent(separator_2, GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
		);
		panel_7.setLayout(gl_panel_7);
		
		pixel = new JLabel("");
		pixel.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		inputValue = new JLabel("");
		inputValue.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		outputValue = new JLabel("");
		outputValue.setFont(new Font("Calibri", Font.PLAIN, 16));
		GroupLayout gl_panel_1 = new GroupLayout(panel_1);
		gl_panel_1.setHorizontalGroup(
			gl_panel_1.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_1.createSequentialGroup()
					.addComponent(panel_7, GroupLayout.PREFERRED_SIZE, 225, GroupLayout.PREFERRED_SIZE)
					.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)
						.addGroup(Alignment.TRAILING, gl_panel_1.createSequentialGroup()
							.addGap(18)
							.addComponent(pixel, GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE))
						.addGroup(gl_panel_1.createSequentialGroup()
							.addGap(18)
							.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)
								.addComponent(inputValue, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
								.addComponent(outputValue, GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE))))
					.addContainerGap())
		);
		gl_panel_1.setVerticalGroup(
			gl_panel_1.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_1.createSequentialGroup()
					.addContainerGap()
					.addComponent(pixel)
					.addGap(18)
					.addComponent(inputValue, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(outputValue, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(143, Short.MAX_VALUE))
				.addComponent(panel_7, GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
		);
		panel_1.setLayout(gl_panel_1);
		
		JPanel panel_2 = new JPanel();
		panel_2.setBackground(new Color(248, 248, 255));
		tabbedPane.addTab("  Region  ", null, panel_2, null);
		
		JPanel panel_8 = new JPanel();
		panel_8.setBackground(new Color(244, 244, 244));
		
		JLabel lblRegionId = new JLabel("Region ID:");
		lblRegionId.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel lblSize = new JLabel("Pixels:");
		lblSize.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel lblMeanValuethis = new JLabel("Mean value:");
		lblMeanValuethis.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JSeparator separator_3 = new JSeparator();
		separator_3.setOrientation(SwingConstants.VERTICAL);
		GroupLayout gl_panel_8 = new GroupLayout(panel_8);
		gl_panel_8.setHorizontalGroup(
			gl_panel_8.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_8.createSequentialGroup()
					.addContainerGap()
					.addGroup(gl_panel_8.createParallelGroup(Alignment.LEADING)
						.addComponent(lblRegionId, GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)
						.addComponent(lblSize, GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)
						.addComponent(lblMeanValuethis, GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(separator_3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addGap(1))
		);
		gl_panel_8.setVerticalGroup(
			gl_panel_8.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_8.createSequentialGroup()
					.addContainerGap()
					.addComponent(lblRegionId, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblSize, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblMeanValuethis, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(123, Short.MAX_VALUE))
				.addComponent(separator_3, GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
		);
		panel_8.setLayout(gl_panel_8);
		
		regionId = new JLabel(" ");
		regionId.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		regionSize = new JLabel("");
		regionSize.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		outputValue2 = new JLabel("");
		outputValue2.setFont(new Font("Calibri", Font.PLAIN, 16));
		GroupLayout gl_panel_2 = new GroupLayout(panel_2);
		gl_panel_2.setHorizontalGroup(
			gl_panel_2.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_2.createSequentialGroup()
					.addComponent(panel_8, GroupLayout.PREFERRED_SIZE, 194, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)
						.addComponent(regionId, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
						.addComponent(regionSize, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
						.addComponent(outputValue2, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE))
					.addContainerGap())
		);
		gl_panel_2.setVerticalGroup(
			gl_panel_2.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_2.createSequentialGroup()
					.addContainerGap()
					.addComponent(regionId)
					.addGap(18)
					.addComponent(regionSize, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(outputValue2, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(123, Short.MAX_VALUE))
				.addComponent(panel_8, GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
		);
		panel_2.setLayout(gl_panel_2);
		
		JPanel panel_3 = new JPanel();
		panel_3.setBackground(new Color(248, 248, 255));
		tabbedPane.addTab("  Method  ", null, panel_3, null);
		
		JPanel panel_9 = new JPanel();
		panel_9.setBackground(new Color(244, 244, 244));
		
		JLabel lblPartitioningMethodUsed = new JLabel("Partitioning method used:");
		lblPartitioningMethodUsed.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel lblRandomPixelsAt = new JLabel("Random pixels at the beginning:");
		lblRandomPixelsAt.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel lblTimeElapsed_1 = new JLabel("Elapsed time:");
		lblTimeElapsed_1.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JLabel lblIterationsOfThe = new JLabel("Iterations of the method:");
		lblIterationsOfThe.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		JSeparator separator_4 = new JSeparator();
		separator_4.setOrientation(SwingConstants.VERTICAL);
		
		JButton btnMakeMoreIterations = new JButton("Make more iterations");
		btnMakeMoreIterations.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				InfoPanel.this.listener.continueIterating();
			}
		});
		btnMakeMoreIterations.setFont(new Font("Calibri", Font.PLAIN, 16));
		GroupLayout gl_panel_9 = new GroupLayout(panel_9);
		gl_panel_9.setHorizontalGroup(
			gl_panel_9.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_9.createSequentialGroup()
					.addContainerGap()
					.addGroup(gl_panel_9.createParallelGroup(Alignment.LEADING)
						.addComponent(lblPartitioningMethodUsed, GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)
						.addComponent(lblRandomPixelsAt, Alignment.TRAILING, GroupLayout.PREFERRED_SIZE, 226, Short.MAX_VALUE)
						.addComponent(lblTimeElapsed_1, GroupLayout.PREFERRED_SIZE, 226, Short.MAX_VALUE)
						.addComponent(lblIterationsOfThe, GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)
						.addComponent(btnMakeMoreIterations))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addComponent(separator_4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addGap(1))
		);
		gl_panel_9.setVerticalGroup(
			gl_panel_9.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_9.createSequentialGroup()
					.addContainerGap()
					.addComponent(lblPartitioningMethodUsed, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblRandomPixelsAt, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblTimeElapsed_1, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(lblIterationsOfThe, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(btnMakeMoreIterations)
					.addContainerGap(44, Short.MAX_VALUE))
				.addComponent(separator_4, GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
		);
		panel_9.setLayout(gl_panel_9);
		
		method = new JLabel("");
		method.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		random = new JLabel("");
		random.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		elapsed2 = new JLabel("");
		elapsed2.setFont(new Font("Calibri", Font.PLAIN, 16));
		
		iterations = new JLabel("");
		iterations.setFont(new Font("Calibri", Font.PLAIN, 16));
		GroupLayout gl_panel_3 = new GroupLayout(panel_3);
		gl_panel_3.setHorizontalGroup(
			gl_panel_3.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_3.createSequentialGroup()
					.addComponent(panel_9, GroupLayout.PREFERRED_SIZE, 243, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addGroup(gl_panel_3.createParallelGroup(Alignment.LEADING)
						.addComponent(method, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
						.addComponent(random, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
						.addComponent(elapsed2, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
						.addComponent(iterations, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE))
					.addContainerGap())
		);
		gl_panel_3.setVerticalGroup(
			gl_panel_3.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_panel_3.createSequentialGroup()
					.addContainerGap()
					.addComponent(method)
					.addGap(18)
					.addComponent(random, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(elapsed2, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addGap(18)
					.addComponent(iterations, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(85, Short.MAX_VALUE))
				.addComponent(panel_9, GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)
		);
		panel_3.setLayout(gl_panel_3);
		setLayout(groupLayout);

	}
}
